<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html" %>
<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic" %>
<%@ taglib uri="http://struts.apache.org/tags-tiles" prefix="tiles" %> 
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>

<tiles:insert page="/general/templateLoggedIn.jsp">
	<tiles:put name="title" value="Name Page"/>
	<tiles:put name="nav"/>
	<tiles:put name="content" type="string">
	
		<h2>Previous Data:</h2>
		
		<ol class="tree">
			<li><label for="general">General Information</label><input type="checkbox" id="general" />
				<ol> 
					<li>
						<table>
							<tr><td>First Name:</td><td><c:out value="${sessionScope.applicant.firstName}"/></td></tr>
							<tr><td>Middle Initial:</td><td><c:out value="${sessionScope.applicant.middleInitial}"/></td></tr>
							<tr><td>Last Name:</td><td><c:out value="${sessionScope.applicant.name}"/></td></tr>
							<tr><td>Country of Citizenship:</td><td><c:out value="${sessionScope.applicant.countryOfCitizenship}"/></td></tr>
							<tr><td>Country of Residence:</td><td><c:out value="${sessionScope.applicant.countryOfResidence}"/></td></tr>
							<tr><td>Street:</td><td><c:out value="${sessionScope.applicant.street}"/></td></tr>
							<tr><td>City:</td><td><c:out value="${sessionScope.applicant.city}"/></td></tr>
							<tr><td>ZIP/Postal Code:</td><td><c:out value="${sessionScope.applicant.zip}"/></td></tr>
							<c:choose>
								<c:when test="${sessionScope.applicant.usResidence == true}">
									<tr><td>State:</td><td>${sessionScope.applicant.state}</td></tr>
								</c:when>
								<c:otherwise>	
									<tr><td>Country Phone Code:</td><td>${sessionScope.applicant.countryPhoneCode}</td></tr>
								</c:otherwise>
							</c:choose>
							<tr><td>Area code:</td><td>${sessionScope.applicant.areaCode}</td></tr>
							<tr><td>Number:</td><td>${sessionScope.applicant.number}</td></tr>
							<c:choose>
								<c:when test="${sessionScope.applicant.usResidence == true}">
									<tr><td>Domestic:</td><td>Yes</td></tr>
								</c:when>
								<c:otherwise>
									<tr><td>Domestic:</td><td>No</td></tr>
								</c:otherwise>
							</c:choose>
						</table>
					</li>
				</ol>
			</li>
		</ol>
			
		<c:forEach var="degree" items="${sessionScope.degrees}">
			<ol class="tree">
				<li><label for="degree">Degree</label><input type="checkbox" id="degree" />
					<ol> 
						<li>	
							<table>
								<tr><td>State/Country:</td><td>${degree.location}</td></tr>
								<tr><td>University:</td><td>${degree.university}</td></tr>
								<tr><td>Discipline:</td><td>${degree.discipline}</td></tr>
								<tr><td>Degree Award:</td><td>${degree.month}/${degree.year}</td></tr>
								<tr><td>GPA:</td><td>${degree.gpa}</td></tr>
								<tr><td>Title:</td><td>${degree.title}</td></tr>
								<tr><td>Transcript:</td><td>${degree.transcription}</td></tr>
							</table>
						</li>
					</ol>
				</li>
			</ol>
		</c:forEach>

		<hr>
		<br>
			
		<h2>Application</h2>
		
		Do you want to submit more degrees or are you done?
		<br><br>
		<html:link action="/provideDegree">Sudmit more degrees</html:link>
		&nbsp;|&nbsp;
		<html:link action="/preSpecialization">Done</html:link>
			
	</tiles:put>
</tiles:insert>